﻿Imports DAO
Imports DTO
Public Class TyGiaBUS
    Public Shared Function LayDSTyGia() As DataTable
        Return TyGiaDAO.LayDSTyGia()
    End Function

    Public Shared Function ThemTyGia(tygia As TyGiaDTO) As Boolean
        Dim kt As Boolean = True
        If tygia.TenTyGia.Length = 0 Then
            Return False
        End If
        TyGiaDAO.ThemTyGia(tygia)
        Return kt
    End Function

    Public Shared Function CapNhatTyGia(tygia As TyGiaDTO) As Boolean
        Dim kt As Boolean = True
        If tygia.TenTyGia.Length = 0 Then
            Return False
        End If
        TyGiaDAO.CapNhatTyGia(tygia)
        Return kt
    End Function

    Public Shared Function XoaTyGia(tygia As TyGiaDTO) As Boolean
        Dim kt As Boolean = True
        If tygia.TenTyGia.Length = 0 Then
            Return False
        End If
        TyGiaDAO.XoaTyGia(tygia)
        Return kt
    End Function

    Public Shared DongKetNoi As SqlClient.SqlConnection = TyGiaDAO.DongKetNoi

End Class
